﻿Imports Crystal.CLL
Imports CrystalDataHub.BLL.DataHub.BusinessObject

Public Class PreviousPositionSorting
    Inherits BaseForm
#Region "Fields"
    'Public mdtPreviousDeliveryListings As New DataTable
    Public mstrSelectedDeliveryListing As String = ""
    Public mstPreviousProjects As List(Of PreviousProjects)
#End Region

#Region "On Load"

    Private Sub DataHub_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CallOnLoad()
    End Sub

    ''' <summary>
    ''' To load the onload functions
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub CallOnLoad()
        SetOnLoadControls()
    End Sub

    ''' <summary>
    ''' To set the controls on load
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub SetOnLoadControls()
        Me.Text = TitleManager.GetTitle("PreviousPositionSorting")
        cmbPreviousListing.DisplayMember = "DeliveryListing"
        cmbPreviousListing.ValueMember = "DeliveryListing"
        'cmbPreviousListing.DataSource = mdtPreviousDeliveryListings
        cmbPreviousListing.DataSource = mstPreviousProjects
    End Sub

#End Region

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        mstrSelectedDeliveryListing = CType(cmbPreviousListing.SelectedItem, PreviousProjects).DeliveryListing
        'mstrSelectedDeliveryListing = cmbPreviousListing.SelectedItem("DeliveryListing")
        Me.Close()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.Close()
    End Sub
End Class